<template>
  <div class='charts' ref='charts'></div>
</template>

<script>
import * as echarts from 'echarts'
export default {
  name: 'barCharts',
  mounted () {
    // 准备宽高容器 初始化实例
    let barCharts = echarts.init (this.$refs.charts)
    barCharts.setOption ({
      xAxis: {
        show: false,
        type: 'category'
      },
      yAxis: {
        show: false
      },
      series: [
       {
          type: 'bar',
          data: [12,34,25,45,27,19,30,7,10,7,34],
          color:'cyan'
       }
      ],
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0,
      },
      tooltip: {
        
      }
    })
    
}
}
</script>

<style scoped>
  .charts {
    height: 100%;
    width: 100%;
  }
</style>
